1. Technical Field
The present disclosure relates to web server creation and, more specifically, to automated creation of web page to XML translation servers.
2. Description of the Related Art
Web based applications, for example, web services, are quickly transforming the way modern businesses interact and share information. Web services are software systems for providing particular functionality over a computer network, for example, the Internet. Web services can generally be identified by Universal Resource Identifiers (URI) in a fashion that may be analogous to the way websites may be identified by Uniform Resource Locators (URLs). Web services generally contain public interfaces and bindings that enable human users and other software systems such as other web services to utilize the functionality of the web services. In this way, web services enhance the way computers communicate with users and each other.
Graphical User Interfaces provide a way to communicate information to and from a user. A GUI may be in the form of web pages, allowing a user to read and manipulate data on a web browser. Since web pages are written in the standard language HTML, and since most personal computers have a web browser installed, a GUI in the form of a web page is convenient and popular. Web browsers use the HTTP protocol to receive and to send data to web servers.
Extensible Markup Language (XML) is a popular language by which web services communicate with one another and with human users. XML is a human readable programming language. XML instructions can be read and understood by a human, as opposed to, for example, computer languages that send instructions as binary data.
Because XML is human readable, instructions formulated in XML may be read and interpreted by any computer utilizing any platform. This stands in contrast to computer languages, such as assembly language, that are hardware specific and not human readable. This ability to be interpreted across platforms makes XML a very good tool for communicating with web services.
Unlike Hypertext Markup Language (HTML) where programs use predefined markup symbols to describe data that is communicated, XML allows for the use of customized markup symbols that may be user defined. Definitions of customized XML markup symbols comprise an XML schema. The XML schema is therefore an important element for interpreting data communicated using XML.
While data communicated in XML, for example, data that has been provided to a user from a web service, may be human readable, raw XML data may not be easily understood by the average user who is not a computer programmer. It is therefore desirable to use a GUI to display XML data in a more palatable format.
A GUI may be developed for interpreting XML data from a particular web service. The GUI may be programmed to display anticipated data elements in a predefined format. Many GUIs are web browser based, allowing a user to view XML data via a web browser. However, GUIs, for example web browser based GUIs, may be difficult and/or time consuming to develop. Additionally, these GUIs are generally specific for displaying data from a particular data source, for example, a particular web service. After a GUI has been developed, the GUI is reprogrammed when the user desires to change the look and/or feel of the GUI.
It is therefore desirable to be able to automatically interpret XML data and automatically generate a suitable GUI for displaying the interpreted XML data in a sensible and customizable format.
Java Architecture for XML Binding (JAXB), from Sun Microsystems, as well as the Castor project (castor.org) allow for the parsing and conversion of XML data into Java. This system allows XML data to be interpreted and converted into a set of Java classes so XML data can be displayed and manipulated in Java. However, a GUI may still have to be programmed to implement the display and manipulation of the data.
HTML documents may include data, such as text, as well as markup symbols (tags) that may communicate details about how the data is to be displayed. An HTML browser, such as a web browser, is able interpret the tags and use them to display the HTML data in an appropriate fashion. HTML data can be used to describe the basic format of a user interface, such as the color and font of text as well as the size and position of links and controls. However, HTML does not have the versatility of XML. HTML, while suitable for the display of standard web pages, may not be suitable for the communication of web service data. Additionally, the user interface of HTML data is generally pre-programmed by an HTML programmer and as such a GUI is not automatically generated.
More recent approaches have been developed for the description of GUIs using XML based languages. For example, User Interface Markup Language (UIML) is an XML based language for defining user interfaces. However these XML based GUI description languages still require significant programmer input to design the various GUI details such as item placement, colors, page layout and so on.
There is therefore a need for a way of automatically generating a user interface for the display and manipulation of data, for example XML and/or web service data, even when no user interface information is included in the data.
The present disclosure provides a method for automatic generation of a GUI program from a XML schema. The GUI program may be a web page, allowing the user to read and manipulate data on a web browser.
Once a GUI program is created, it is desirable to provide a two-way interactive communication between the GUI and the web service. To achieve this, it is desirable that a server program (or server programs) perform a translation function between the GUI and the XML web service. A server program will take the data the user created or changed through a web page and map it to an XML message, to be sent to the web service. The data the user created on the web page may be obtained from an HTTP GET or POST operation derived from the HTML web page form. If a response from the web service comes, a server program will take the XML message and transform it to HTML information to be displayed on the web GUI. These server programs are referred to as “translation servers”. However, manually writing these server programs from scratch for every web service message is repetitive, cumbersome and error prone.
As noted above, a number of tools (e.g. ‘Castor’ from castor.org, ‘JAXB’ from sun.com) provide for automatic creation of Java classes from XML schema. These Java classes provide programmers with an automated way of translating XML data into data structures that can be easily used within a program. However, these schema derived Java classes are simply containers for data, and do not provide any automated way for processing HTTP data from a web page GUI to construct the final XML. This step is still done manually.
There are also numerous tools (e.g. Apache Axis and Microsoft .NET) that will construct XML descriptions from existing server programs. However, there is no corresponding mechanism to do the reverse step, to automatically create server programs from XML descriptions. The present practice is to do the writing manually.
There is therefore a need for a way of automatically generating server programs that will translate data created through a GUI, specifically, data derived from a web page, to an XML message, to be sent to the web service, and also to do the reverse mapping of XML messages to information to be displayed in the GUI. There is a need for a way for allowing two-way interactive communication between the web page and the web service.